package com.cqh.service.impl;

import com.cqh.bean.Student;
import com.cqh.dao.StudentDao;
import com.cqh.dao.impl.StudentDaoImpl;
import com.cqh.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao dao = new StudentDaoImpl();
    @Override
    public List<Student> getAllStudents(String stuname,String stuno,int sex,int pageIndex,int pageSize) {
        return dao.getAllStudents(stuname,stuno,sex,pageIndex,pageSize);
    }

    @Override
    public int total(String stuname, String stuno, int sex) {
        return dao.total(stuname,stuno,sex);
    }

    @Override
    public int insertStudent(Student student) {
        return dao.insertStudent(student);
    }

    @Override
    public Student findById(int stuId) {
        return dao.findById(stuId);
    }

    @Override
    public int updateStu(Student student) {
        return dao.updateStu(student);
    }

    @Override
    public int delStu(String stuId) {
        return dao.delStu(stuId);
    }
}
